package an.qt.useJar;
import java.lang.String;
import android.content.Context;  
import android.content.Intent; 
import android.util.Log;
import android.net.Uri;

public class ExtendsQtWithJava extends org.qtproject.qt5.android.bindings.QtActivity
{
    private static ExtendsQtWithJava m_instance;
    private final static String TAG = "extendsQt";  
    private static String m_pageUri = null;  
      
  
    public ExtendsQtWithJava(){  
        m_instance = this;  
    }  
   
    public static ExtendsQtNative m_nativeNotify = null;  
  
    public static int addQQ(String uri){
        Log.d(TAG, "addQQ:" + uri);
        Intent intent = new Intent();
        intent.setData(Uri.parse(uri));

        try{
            m_instance.startActivity(intent);
            return 1;
        }catch(Exception e){
            return -1;
        }
    }  
      
    private void notifyQt(int result, String uri, String data){  
        if(m_nativeNotify == null){  
            m_nativeNotify = new ExtendsQtNative();  
        }  
        m_nativeNotify.OnDownloaded(result, uri, data);  
    }  
}

